<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mdsproject/mds_logistictask/Mds_LogisticTask.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mdsproject/mds_logistictask/Mds_LogisticTask.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Mds_LogisticTask",
        setup() {
            const table = ref({
                key: "LogisticTaskId",
                footer: "Foots",
                cnName: "物流任务状态",
                name: "mds_logistictask/Mds_LogisticTask",
                newTabEdit: false,
                url: "/Mds_LogisticTask/",
                sortName: "LogisticTaskId"
            });
            const editFormFields = ref({"BeginSiteId":"","EndSiteId":"","WorkOrder":"","TaskStatus":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"MDS_LogisticSite","data":[],"title":"起始物流点位","field":"BeginSiteId","type":"select"},
                               {"dataKey":"MDS_LogisticSite","data":[],"title":"目标物流点位","field":"EndSiteId","type":"select"}],
                              [{"title":"生产任务单","field":"WorkOrder"},
                               {"dataKey":"MDS_TaskStatus","data":[],"title":"任务状态","field":"TaskStatus","disabled":true,"type":"select"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"LogisticTypeId":"","BeginSiteId":"","EndSiteId":"","WorkOrder":"","TaskStatus":""});
            const searchFormOptions = ref([[{"dataKey":"MDS_TaskStatus","data":[],"title":"任务状态","field":"TaskStatus","type":"select"},{"dataKey":"MDS_LogisticType","data":[],"title":"物流任务类型","field":"LogisticTypeId","type":"select"},{"title":"生产任务单","field":"WorkOrder","type":"like"},{"dataKey":"MDS_LogisticSite","data":[],"title":"起始物流点位","field":"BeginSiteId","type":"select"},{"dataKey":"MDS_LogisticSite","data":[],"title":"目标物流点位","field":"EndSiteId","type":"select"}]]);
            const columns = ref([{field:"LogisticTaskId",title:"ID",type:"bigint",link:true,width:150,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTypeId",title:"物流任务类型",type:"bigint",bind:{ key:"MDS_LogisticType",data:[]},width:180,showOverflowTooltip:true,align:"left"},
                       {field:"BeginSiteId",title:"起始物流点位",type:"bigint",bind:{ key:"MDS_LogisticSite",data:[]},width:150,showOverflowTooltip:true,align:"left"},
                       {field:"EndSiteId",title:"目标物流点位",type:"bigint",bind:{ key:"MDS_LogisticSite",data:[]},width:150,showOverflowTooltip:true,align:"left"},
                       {field:"WorkOrder",title:"生产任务单",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"TaskStatus",title:"任务状态",type:"int",bind:{ key:"MDS_TaskStatus",data:[]},width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"BeginTime",title:"开始时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EndTime",title:"结束时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([  { 
                    cnName: "路线明细",
                    table: "Mds_LogisticTaskDetail",
                    columns: [{field:"LogisticTaskDetailId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTaskId",title:"物流任务",type:"bigint",width:110,hidden:true,readonly:true,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"Seq",title:"顺序",type:"int",width:60,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticLineId",title:"物流路线",type:"bigint",bind:{ key:"MDS_LogisticLine",data:[]},width:150,hidden:true,readonly:true,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"TaskNo",title:"下发任务号",type:"int",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"BeginSiteId",title:"起始物流点位",type:"bigint",bind:{ key:"MDS_LogisticSite",data:[]},width:150,readonly:true,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"EndSiteId",title:"目标物流点位",type:"bigint",bind:{ key:"MDS_LogisticSite",data:[]},width:150,readonly:true,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"MachineId",title:"执行设备",type:"bigint",bind:{ key:"BASE_Machine_Lgt",data:[]},width:150,readonly:true,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"BeginSiteAlias",title:"起始点位别名",type:"string",width:150,readonly:true,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"EndSiteAlias",title:"目标点位别名",type:"string",width:150,readonly:true,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"TaskStatus",title:"任务状态",type:"int",bind:{ key:"MDS_TaskStatus",data:[]},width:110,readonly:true,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"BeginTime",title:"开始时间",type:"datetime",width:110,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"EndTime",title:"结束时间",type:"datetime",width:110,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,edit:{type:"textarea"},showOverflowTooltip:true,align:"left"}],
                    sortName: "Seq asc",
                    key: "LogisticTaskDetailId",
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            },                    { 
                    cnName: "任务日志",
                    table: "Mds_LogisticTaskLog",
                    columns: [{field:"LogisticTaskLogId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTaskId",title:"生产任务",type:"bigint",width:110,hidden:true,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"LogType",title:"日志类型",type:"int",bind:{ key:"MDS_LogType",data:[]},width:110,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"LogContent",title:"日志内容",type:"string",width:500,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"Msg1",title:"消息1",type:"string",width:150,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"Msg2",title:"消息2",type:"string",width:150,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,edit:{type:"textarea"},showOverflowTooltip:true,align:"left"}],
                    sortName: "LogisticTaskLogId",
                    key: "LogisticTaskLogId",
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            }]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
